'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.get('/', controller.home.index);
  router.get('/list', controller.home.list);
  router.get('/empty_list', controller.home.empty_list);
  router.get('/dicts', controller.home.dicts);
  router.get('/options', controller.home.options);
  router.post('/upload', controller.home.upload);

  router.post('/edit', controller.home.edit);
  router.put('/edit', controller.home.edit);

  router.get('/form', controller.home.form);
  router.get('/form2', controller.home.form2);
  router.get('/detail2', controller.home.detail2);

  router.get('/demo1/list', controller.demo1.list);
  router.get('/demo1/init', controller.demo1.init);

  router.get('/demo1/tongji', controller.demo1.tongji);
  router.get('/demo1/tongji_2', controller.demo1.tongji_2);
  router.get('/demo1/form', controller.demo1.form);

  router.get('/demo1/tree', controller.demo1.tree);
  router.get('/demo1/menu', controller.demo1.menu);
  router.post('/demo1/file', controller.demo1.file);
};
